/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package raccoon.suvisa.datos.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Laura
 */
@Entity
@Table(name = "TRANSACCION", catalog = "", schema = "IS963601")
@NamedQueries({@NamedQuery(name = "Transaccion.findAll", query = "SELECT t FROM Transaccion t"), @NamedQuery(name = "Transaccion.findByIdTransaccion", query = "SELECT t FROM Transaccion t WHERE t.idTransaccion = :idTransaccion"), @NamedQuery(name = "Transaccion.findByFecha", query = "SELECT t FROM Transaccion t WHERE t.fecha = :fecha"), @NamedQuery(name = "Transaccion.findByMonto", query = "SELECT t FROM Transaccion t WHERE t.monto = :monto"), @NamedQuery(name = "Transaccion.findByIdCuentao", query = "SELECT t FROM Transaccion t WHERE t.idCuentao = :idCuentao"), @NamedQuery(name = "Transaccion.findByIdCuentad", query = "SELECT t FROM Transaccion t WHERE t.idCuentad = :idCuentad"), @NamedQuery(name = "Transaccion.findByCancelada", query = "SELECT t FROM Transaccion t WHERE t.cancelada = :cancelada"), @NamedQuery(name = "Transaccion.findByFechacancelada", query = "SELECT t FROM Transaccion t WHERE t.fechacancelada = :fechacancelada"), @NamedQuery(name = "Transaccion.findByCuotas", query = "SELECT t FROM Transaccion t WHERE t.cuotas = :cuotas")})
public class Transaccion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_TRANSACCION", nullable = false, precision = 22)
    private BigDecimal idTransaccion;
    @Basic(optional = false)
    @Column(name = "FECHA", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecha;
    @Basic(optional = false)
    @Column(name = "MONTO", nullable = false)
    private double monto;
    @Basic(optional = false)
    @Column(name = "ID_CUENTAO", nullable = false)
    private BigInteger idCuentao;
    @Basic(optional = false)
    @Column(name = "ID_CUENTAD", nullable = false)
    private BigInteger idCuentad;
    @Basic(optional = false)
    @Column(name = "CANCELADA", nullable = false)
    private char cancelada;
    @Column(name = "FECHACANCELADA")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechacancelada;
    @Basic(optional = false)
    @Column(name = "CUOTAS", nullable = false)
    private BigInteger cuotas;

    public Transaccion() {
    }

    public Transaccion(BigDecimal idTransaccion) {
        this.idTransaccion = idTransaccion;
    }

    public Transaccion(BigDecimal idTransaccion, Date fecha, double monto, BigInteger idCuentao, BigInteger idCuentad, char cancelada, BigInteger cuotas) {
        this.idTransaccion = idTransaccion;
        this.fecha = fecha;
        this.monto = monto;
        this.idCuentao = idCuentao;
        this.idCuentad = idCuentad;
        this.cancelada = cancelada;
        this.cuotas = cuotas;
    }

    public BigDecimal getIdTransaccion() {
        return idTransaccion;
    }

    public void setIdTransaccion(BigDecimal idTransaccion) {
        this.idTransaccion = idTransaccion;
    }

    public Date getFecha() {
        return fecha;
    }

    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }

    public double getMonto() {
        return monto;
    }

    public void setMonto(double monto) {
        this.monto = monto;
    }

    public BigInteger getIdCuentao() {
        return idCuentao;
    }

    public void setIdCuentao(BigInteger idCuentao) {
        this.idCuentao = idCuentao;
    }

    public BigInteger getIdCuentad() {
        return idCuentad;
    }

    public void setIdCuentad(BigInteger idCuentad) {
        this.idCuentad = idCuentad;
    }

    public char getCancelada() {
        return cancelada;
    }

    public void setCancelada(char cancelada) {
        this.cancelada = cancelada;
    }

    public Date getFechacancelada() {
        return fechacancelada;
    }

    public void setFechacancelada(Date fechacancelada) {
        this.fechacancelada = fechacancelada;
    }

    public BigInteger getCuotas() {
        return cuotas;
    }

    public void setCuotas(BigInteger cuotas) {
        this.cuotas = cuotas;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTransaccion != null ? idTransaccion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Transaccion)) {
            return false;
        }
        Transaccion other = (Transaccion) object;
        if ((this.idTransaccion == null && other.idTransaccion != null) || (this.idTransaccion != null && !this.idTransaccion.equals(other.idTransaccion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "raccoon.suvisa.datos.entities.Transaccion[idTransaccion=" + idTransaccion + "]";
    }

}
